<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>17_jQuery-prop基本操作</title>
</head>
<body>

  <ul id="list" class="panel" name="prop">
    <li class="li-1">li-1</li>
    <li class="li-2">li-2</li>
    <li class="li-3">li-3</li>
    <li class="li-4">li-4</li>
    <li class="li-5">li-5</li>
  </ul>

  <input type="text">

  <script src="../libs/jquery-3.6.0.js"></script>
  <script>
    $(function() {
      // 1. prop() 获取属性值
      console.log($("ul").prop("id"))
      console.log($("ul").prop("class"))
    })

  </script>
  
</body>
</html>